-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(Embed): Add component feat(Embed): Add component feat(Embed): Add component feat(Embed): Add component feat(Embed): Add component feat(Embed): Add component feat(Embed): Add tests feat(Embed): Add tests feat(Embed): Add component feat(Embed): Add component * feat(Embed): Update prop names
- Loading branch information
1 parent
13a800f
commit 8d01cc6
Showing
16 changed files
with
562 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
docs/app/Examples/modules/Embed/States/EmbedExampleActive.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React, { Component } from 'react' | ||
import { Button, Divider, Embed } from 'semantic-ui-react' | ||
|
||
export default class EmbedExampleActive extends Component { | ||
state = {} | ||
|
||
handleClick = () => this.setState({ active: true }) | ||
|
||
render() { | ||
const { active } = this.state | ||
|
||
return ( | ||
<div> | ||
<Embed | ||
active={active} | ||
icon='arrow circle down' | ||
placeholder='http://semantic-ui.com/images/image-16by9.png' | ||
source='youtube' | ||
sourceId='90Omh7_I8vI' | ||
/> | ||
|
||
<Divider hidden /> | ||
|
||
<Button | ||
content='Activate' | ||
icon='bomb' | ||
labelPosition='left' | ||
onClick={this.handleClick} | ||
/> | ||
</div> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react' | ||
|
||
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' | ||
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' | ||
|
||
const EmbedStatesExamples = () => ( | ||
<ExampleSection title='States'> | ||
<ComponentExample | ||
title='Active' | ||
description='An embed can be active.' | ||
examplePath='modules/Embed/States/EmbedExampleActive' | ||
/> | ||
</ExampleSection> | ||
) | ||
|
||
export default EmbedStatesExamples |
12 changes: 12 additions & 0 deletions
12
docs/app/Examples/modules/Embed/Types/EmbedExampleCustom.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react' | ||
import { Embed } from 'semantic-ui-react' | ||
|
||
const EmbedExampleCustom = () => ( | ||
<Embed | ||
icon='right circle arrow' | ||
placeholder='http://semantic-ui.com/images/image-16by9.png' | ||
sourceUrl='http://www.myfav.es/jack' | ||
/> | ||
) | ||
|
||
export default EmbedExampleCustom |
12 changes: 12 additions & 0 deletions
12
docs/app/Examples/modules/Embed/Types/EmbedExampleVimeo.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react' | ||
import { Embed } from 'semantic-ui-react' | ||
|
||
const EmbedExampleVimeo = () => ( | ||
<Embed | ||
placeholder='http://semantic-ui.com/images/vimeo-example.jpg' | ||
source='vimeo' | ||
sourceId='125292332' | ||
/> | ||
) | ||
|
||
export default EmbedExampleVimeo |
12 changes: 12 additions & 0 deletions
12
docs/app/Examples/modules/Embed/Types/EmbedExampleYoutube.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from 'react' | ||
import { Embed } from 'semantic-ui-react' | ||
|
||
const EmbedExampleYouTube = () => ( | ||
<Embed | ||
placeholder='http://semantic-ui.com/images/image-16by9.png' | ||
source='youtube' | ||
sourceId='O6Xo21L0ybE' | ||
/> | ||
) | ||
|
||
export default EmbedExampleYouTube |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react' | ||
import { Message } from 'semantic-ui-react' | ||
|
||
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' | ||
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' | ||
|
||
const EmbedTypesExamples = () => ( | ||
<ExampleSection title='Types'> | ||
<ComponentExample | ||
title='YouTube' | ||
description='An embed can be used to display YouTube Content.' | ||
examplePath='modules/Embed/Types/EmbedExampleYoutube' | ||
/> | ||
<ComponentExample | ||
title='Vimeo' | ||
description='An embed can be used to display Vimeo content.' | ||
examplePath='modules/Embed/Types/EmbedExampleVimeo' | ||
/> | ||
<ComponentExample | ||
title='Custom Content' | ||
description='An embed can display any web content.' | ||
examplePath='modules/Embed/Types/EmbedExampleCustom' | ||
> | ||
<Message info> | ||
Embeds use an intrinsic aspect ratios to embed content responsively. Content will preserve their intrinsic | ||
aspect ratio for all browser sizes responsively | ||
</Message> | ||
</ComponentExample> | ||
</ExampleSection> | ||
) | ||
|
||
export default EmbedTypesExamples |
18 changes: 18 additions & 0 deletions
18
docs/app/Examples/modules/Embed/Usage/EmbedExampleSettings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import React from 'react' | ||
import { Embed } from 'semantic-ui-react' | ||
|
||
const EmbedExampleSettings = () => ( | ||
<Embed | ||
placeholder='http://semantic-ui.com/images/image-16by9.png' | ||
source='youtube' | ||
sourceId='D0WnZyxp_Wo' | ||
sourceSettings={{ | ||
autoPlay: false, | ||
brandedUI: false, | ||
color: 'white', | ||
hd: false, | ||
}} | ||
/> | ||
) | ||
|
||
export default EmbedExampleSettings |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react' | ||
|
||
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' | ||
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' | ||
|
||
const EmbedUsageExamples = () => ( | ||
<ExampleSection title='Usage'> | ||
<ComponentExample | ||
title='Source settings' | ||
description='Settings to configure video behavior.' | ||
examplePath='modules/Embed/Usage/EmbedExampleSettings' | ||
/> | ||
</ExampleSection> | ||
) | ||
|
||
export default EmbedUsageExamples |
13 changes: 13 additions & 0 deletions
13
docs/app/Examples/modules/Embed/Variations/EmbedExampleAspectRatio.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react' | ||
import { Embed } from 'semantic-ui-react' | ||
|
||
const EmbedExampleAspectRatio = () => ( | ||
<Embed | ||
aspectRatio='4:3' | ||
placeholder='http://semantic-ui.com/images/4by3.jpg' | ||
source='youtube' | ||
sourceId='HTZudKi36bo' | ||
/> | ||
) | ||
|
||
export default EmbedExampleAspectRatio |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react' | ||
|
||
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' | ||
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' | ||
|
||
const EmbedVariationsExamples = () => ( | ||
<ExampleSection title='Variations'> | ||
<ComponentExample | ||
title='Aspect Ratio' | ||
description='An embed can specify an alternative aspect ratio.' | ||
examplePath='modules/Embed/Variations/EmbedExampleAspectRatio' | ||
/> | ||
</ExampleSection> | ||
) | ||
|
||
export default EmbedVariationsExamples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import React from 'react' | ||
|
||
import States from './States' | ||
import Types from './Types' | ||
import Variations from './Variations' | ||
import Usage from './Usage' | ||
|
||
const EmbedExamples = () => ( | ||
<div> | ||
<Types /> | ||
<States /> | ||
<Variations /> | ||
<Usage /> | ||
</div> | ||
) | ||
|
||
export default EmbedExamples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.