mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix/16207/text component storybook (#16214)
This commit is contained in:
parent
c00749dcf7
commit
4581a3ac77
@ -269,6 +269,7 @@ import { Text } from '../../ui/component-library/text';
|
||||
<Text as="p">p</Text>
|
||||
<Text as="span">span</Text>
|
||||
<Text as="strong">strong</Text>
|
||||
<Text as="input" placeholder="input"></Text>
|
||||
```
|
||||
|
||||
Renders the html:
|
||||
@ -288,6 +289,7 @@ Renders the html:
|
||||
<p>p</p>
|
||||
<span>span</span>
|
||||
<strong>strong</strong>
|
||||
<input placeholder="input" />
|
||||
```
|
||||
|
||||
### Box Props
|
||||
|
@ -259,12 +259,17 @@ export const Ellipsis = (args) => (
|
||||
|
||||
export const As = (args) => (
|
||||
<>
|
||||
{Object.values(ValidTags).map((tag) => (
|
||||
<div key={tag}>
|
||||
<Text {...args} as={tag}>
|
||||
{tag}
|
||||
</Text>
|
||||
</div>
|
||||
))}
|
||||
{ValidTags.map((tag) => {
|
||||
if (tag === 'input') {
|
||||
return <Text key={tag} {...args} as={tag} placeholder={tag} />;
|
||||
}
|
||||
return (
|
||||
<div key={tag}>
|
||||
<Text {...args} as={tag}>
|
||||
{tag}
|
||||
</Text>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user