mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-26 20:34:02 +00:00
Merge pull request #3956 from overleaf/ae-icon-story
Add a story for the Icon component GitOrigin-RevId: fd63c4138fdea197b941b56a404e2dd8b20f7324
This commit is contained in:
parent
7786a08e54
commit
3c9cd69bfa
1 changed files with 51 additions and 0 deletions
51
services/web/frontend/stories/icon.stories.js
Normal file
51
services/web/frontend/stories/icon.stories.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
import React from 'react'
|
||||
import Icon from '../js/shared/components/icon'
|
||||
|
||||
export const Type = args => {
|
||||
return (
|
||||
<>
|
||||
<Icon {...args} />
|
||||
<div>
|
||||
<a
|
||||
href="https://fontawesome.com/v4.7.0/icons/"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
Font Awesome icons
|
||||
</a>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Type.args = {
|
||||
type: 'tasks',
|
||||
}
|
||||
|
||||
export const Spinner = args => {
|
||||
return <Icon {...args} />
|
||||
}
|
||||
Spinner.args = {
|
||||
type: 'spinner',
|
||||
spin: true,
|
||||
}
|
||||
|
||||
export const FixedWidth = args => {
|
||||
return <Icon {...args} />
|
||||
}
|
||||
FixedWidth.args = {
|
||||
type: 'tasks',
|
||||
modifier: 'fw',
|
||||
}
|
||||
|
||||
export const AccessibilityLabel = args => {
|
||||
return <Icon {...args} />
|
||||
}
|
||||
AccessibilityLabel.args = {
|
||||
type: 'check',
|
||||
accessibilityLabel: 'Check',
|
||||
}
|
||||
|
||||
export default {
|
||||
title: 'Icon',
|
||||
component: Icon,
|
||||
}
|
Loading…
Reference in a new issue