Grafana-UI: Add Card component (#28216)

* Base card

* Add disabled state

* Expand knobs

* Add card actions

* Add meta data

* Allow custom tags

* Extend container props

* Add inner link

* Add docs

* Add missing keys

* Update margins

* Add description

* Add full card example

* Tweak disabld state

* Export Card

* title => heading

* Filter out empty content

* Add disableEvents

* Move tooltip to container

* Use new Card for AlertRuleItem

* Cleanup

* Update snapshot

* Rename props

* Rename props[2]

* Disable hover is onClick is missing

* Fix alert rule item

* Update snapshot

* Export CardProps

* Replace logo

* Remove tag prop

* Remove extra div

* Add @public

* Update AlertRuleItem

* Simplify disabled logic

* Export Card styles

* Remove AlertRuleItem tooltips

* Revert to old button design

* Make component internal

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
Alex Khomenko
2020-10-28 09:23:22 +02:00
committed by GitHub
parent 33ef71d81e
commit c96ef2676e
8 changed files with 792 additions and 125 deletions

View File

@ -29,7 +29,7 @@ export { TimeZonePicker } from './TimePicker/TimeZonePicker';
export { List } from './List/List';
export { TagsInput } from './TagsInput/TagsInput';
export { Pagination } from './Pagination/Pagination';
export { Tag } from './Tags/Tag';
export { Tag, OnTagClick } from './Tags/Tag';
export { TagList } from './Tags/TagList';
export { FilterPill } from './FilterPill/FilterPill';
@ -169,6 +169,7 @@ export { Checkbox } from './Forms/Checkbox';
export { TextArea } from './TextArea/TextArea';
export { FileUpload } from './FileUpload/FileUpload';
export { TimeRangeInput } from './TimePicker/TimeRangeInput';
export { Card, Props as CardProps, ContainerProps, CardInnerProps, getCardStyles } from './Card/Card';
// Legacy forms