forked from Semantic-Org/Semantic-UI-React
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
breaking(Popup): switch to Popper.js (Semantic-Org#3532)
* breaking(Popup): switch to Popper.js * chore(package): update react-hot-loader * update UTs * fix offset, update docs * rework docs
- Loading branch information
1 parent
7defef1
commit ee2bb8e
Showing
29 changed files
with
598 additions
and
838 deletions.
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
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 |
---|---|---|
|
@@ -16,9 +16,7 @@ const Document = ({ Body, children, Head, Html, siteData: { dev, versions } }) = | |
href={`https://cdn.jsdelivr.net/npm/semantic-ui@${versions.sui}/dist/semantic.min.css`} | ||
/> | ||
|
||
<script | ||
src='https://cdn.jsdelivr.net/npm/@babel/[email protected]/dist/polyfill.min.js' | ||
/> | ||
<script src='https://cdn.jsdelivr.net/npm/@babel/[email protected]/dist/polyfill.min.js' /> | ||
<script | ||
src={`https://cdnjs.cloudflare.com/ajax/libs/anchor-js/${versions.anchor}/anchor.min.js`} | ||
/> | ||
|
@@ -57,9 +55,15 @@ const Document = ({ Body, children, Head, Html, siteData: { dev, versions } }) = | |
}.js`} | ||
/> | ||
<script | ||
src={`https://cdn.jsdelivr.net/npm/react-dom@${versions.react}/umd/react-dom${ | ||
dev ? '.development' : '.production.min' | ||
}.js`} | ||
src={ | ||
dev | ||
? ` https://cdn.jsdelivr.net/npm/@hot-loader/react-dom@${ | ||
versions.react | ||
}/umd/react-dom.development.js` | ||
: `https://cdn.jsdelivr.net/npm/react-dom@${ | ||
versions.react | ||
}/umd/react-dom.production.min.js` | ||
} | ||
/> | ||
<script | ||
src={`https://cdn.jsdelivr.net/npm/react-dom@${ | ||
|
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
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
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
docs/src/examples/modules/Popup/Types/PopupExampleTrigger.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,27 @@ | ||
import React from 'react' | ||
import { Popup, Card, Image, Rating } from 'semantic-ui-react' | ||
|
||
const PopupExampleTrigger = () => ( | ||
<Popup | ||
trigger={ | ||
<Card> | ||
<Image src='/images/movies/totoro-horizontal.jpg' /> | ||
<Card.Content> | ||
<Card.Header>My Neighbor Totoro</Card.Header> | ||
<Card.Description> | ||
Two sisters move to the country with their father in order to be | ||
closer to their hospitalized mother, and discover the surrounding | ||
trees are inhabited by magical spirits. | ||
</Card.Description> | ||
</Card.Content> | ||
</Card> | ||
} | ||
> | ||
<Popup.Header>User Rating</Popup.Header> | ||
<Popup.Content> | ||
<Rating icon='star' defaultRating={3} maxRating={4} /> | ||
</Popup.Content> | ||
</Popup> | ||
) | ||
|
||
export default PopupExampleTrigger |
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
38 changes: 38 additions & 0 deletions
38
docs/src/examples/modules/Popup/Usage/PopupExampleActions.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,38 @@ | ||
import React from 'react' | ||
import { Button, Grid, Input, Popup } from 'semantic-ui-react' | ||
|
||
const PopupExampleActions = () => ( | ||
<Grid columns={1}> | ||
<Grid.Column> | ||
<Popup | ||
trigger={<Button icon='add' content='Add a friend' />} | ||
content='Sends an email invite to a friend.' | ||
on='hover' | ||
/> | ||
<Popup | ||
trigger={ | ||
<Button color='red' icon='flask' content='Activate doomsday device' /> | ||
} | ||
content={<Button color='green' content='Confirm the launch' />} | ||
on='click' | ||
position='top right' | ||
/> | ||
<Popup | ||
trigger={<Input icon='search' placeholder='Search...' />} | ||
header='Movie Search' | ||
content='You may search by genre, header, year and actors' | ||
on='focus' | ||
/> | ||
</Grid.Column> | ||
<Grid.Column> | ||
<Popup | ||
trigger={<Button icon>Click me or Hover me</Button>} | ||
header='Movie Search' | ||
content='Multiple events can trigger a popup' | ||
on={['hover', 'click']} | ||
/> | ||
</Grid.Column> | ||
</Grid> | ||
) | ||
|
||
export default PopupExampleActions |
13 changes: 0 additions & 13 deletions
13
docs/src/examples/modules/Popup/Usage/PopupExampleClick.js
This file was deleted.
Oops, something went wrong.
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
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
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
13 changes: 0 additions & 13 deletions
13
docs/src/examples/modules/Popup/Usage/PopupExampleFocus.js
This file was deleted.
Oops, something went wrong.
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
12 changes: 0 additions & 12 deletions
12
docs/src/examples/modules/Popup/Usage/PopupExampleHover.js
This file was deleted.
Oops, something went wrong.
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.