-
Notifications
You must be signed in to change notification settings - Fork 15
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
docs: icon #774
docs: icon #774
Conversation
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.
Update after #696 merges.
We should have an example that shows and searches all icons, similar to what we do in our internal style guide. Does how it's defined in types allow to iterate that?
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.
update to use prefix less icons.
I would use "filter", "bell" or "squirrel"
@dsmmcken I'm assuming this is for the search example with all the available icons. Does this mean I should remove the dh icons since we decided to always add the prefix for those to avoid conflict (previous icon PR)? |
I meant that in context of instead of all the example saying "dhTruck". The search thing should use a ui.grid to look orderly instead of flex. |
plugins/ui/docs/components/icon.md
Outdated
Icons in Spectrum support four semantic colors: negative, notice, positive, and informative. While icons within React Spectrum components are usually styled with the appropriate colors, you can use the `color` prop to customize the color of standalone icons. | ||
|
||
```python | ||
from deephaven import ui | ||
|
||
|
||
@ui.component | ||
def icons(): | ||
negative = ui.icon(name="bell", color="negative") | ||
informative = ui.icon(name="bell", color="informative") | ||
positive = ui.icon(name="bell", color="positive") | ||
|
||
return [negative, informative, positive] | ||
|
||
|
||
my_icons = icons() |
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.
Create a follow up ticket. Icons should accept our theme colors rather than just these from spectrum,
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.
plugins/ui/docs/components/icon.md
Outdated
|
||
@ui.component | ||
def icons(): | ||
icon = ui.icon(name="filter") |
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.
named arg is optional no? Should we be showing it as just ui.icon("filter")
everywhere without the named arg or at least here.
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.
Yup it is optional it would only cause an issue if they put the icon name after another prop but I don't think that would happen often (ie. ui.icon(size="S", "bell")
) so I just removed the name arg from all the examples
Closes #732