-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(Progress): use correct width for value/total #2503
Merged
levithomason
merged 4 commits into
Semantic-Org:master
from
rachelslurs:fix-progress-value-width
Feb 14, 2018
+19
−2
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
4f27c00
fix(Progress): adds condition to display percentage when progress='va…
rachelslurs 259005b
docs(Progress): add example of progress bar with progress='value' and…
rachelslurs 3ea5876
lint error fix
rachelslurs 9742b8c
adding simpler example
rachelslurs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
35 changes: 35 additions & 0 deletions
35
docs/app/Examples/modules/Progress/Content/ProgressExampleProgressValuePercentageOfTotal.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,35 @@ | ||
import React from 'react' | ||
import { Divider, Icon, Item, Progress } from 'semantic-ui-react' | ||
|
||
const ProgressExampleProgressValuePercentageOfTotal = () => ( | ||
<Item.Group divided relaxed> | ||
<Item> | ||
<Item.Image size='small' src='/assets/images/avatar/large/rachel.png' /> | ||
<Item.Content> | ||
<Item.Header>Rachel</Item.Header> | ||
<Item.Meta><Icon circular name='book' /> last read an article on January 26th</Item.Meta> | ||
<Item.Meta><Icon circular name='newspaper' /> read 20 articles in January</Item.Meta> | ||
<Divider hidden /> | ||
<Item.Description> | ||
<Progress progress='value' value={15} total={20} content='Politics' color='blue' /> | ||
<Progress progress='value' value={5} total={20} content='Cats' color='yellow' /> | ||
</Item.Description> | ||
</Item.Content> | ||
</Item> | ||
<Item> | ||
<Item.Image size='small' src='/assets/images/avatar/large/zoe.jpg' /> | ||
<Item.Content> | ||
<Item.Header>Zoe</Item.Header> | ||
<Item.Meta><Icon circular name='book' /> last read an article on January 10th</Item.Meta> | ||
<Item.Meta><Icon circular name='newspaper' /> read 7 articles in January</Item.Meta> | ||
<Divider hidden /> | ||
<Item.Description> | ||
<Progress progress='value' value={5} total={7} content='Fashion' color='purple' /> | ||
<Progress progress='value' value={2} total={7} content='Cats' color='yellow' /> | ||
</Item.Description> | ||
</Item.Content> | ||
</Item> | ||
</Item.Group> | ||
) | ||
|
||
export default ProgressExampleProgressValuePercentageOfTotal |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's simplify this example down to the minimum amount code required to show the feature. It makes the docs a little quicker to scan and the doc code editor easier to play with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, good idea. I wasn't sure if an example use case might be useful. Would there be somewhere else more appropriate to add the example I did?
I'll update this with a simpler example tomorrow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now we don't have a formal place for more cohesive examples. It may be something we add in the future.