mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 19:44:21 +00:00
✨ Add Idiomatic
semantic
This commit is contained in:
parent
4cb6ad30ea
commit
e63750e41f
2 changed files with 34 additions and 0 deletions
17
src/components/semantics/Idiomatic.stories.jsx
Normal file
17
src/components/semantics/Idiomatic.stories.jsx
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import * as React from "react"
|
||||||
|
import * as ReactDOM from "react-dom"
|
||||||
|
import * as Decorators from "../../utils/Decorators"
|
||||||
|
import { Idiomatic as IdiomaticComponent } from "./Idiomatic"
|
||||||
|
|
||||||
|
|
||||||
|
export default {
|
||||||
|
component: IdiomaticComponent,
|
||||||
|
title: "Semantics/Idiomatic",
|
||||||
|
decorators: [Decorators.Bluelib],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const Idiomatic = props => (
|
||||||
|
<IdiomaticComponent {...props}/>
|
||||||
|
)
|
||||||
|
Idiomatic.args = {}
|
17
src/components/semantics/Idiomatic.tsx
Normal file
17
src/components/semantics/Idiomatic.tsx
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
import * as React from "react"
|
||||||
|
import * as ReactDOM from "react-dom"
|
||||||
|
import * as Types from "../../types"
|
||||||
|
import {BaseElement} from "../BaseElement"
|
||||||
|
import mergeClassNames from "classnames"
|
||||||
|
|
||||||
|
|
||||||
|
export interface IdiomaticProps extends Types.BluelibHTMLProps<HTMLElement> {}
|
||||||
|
|
||||||
|
|
||||||
|
export function Idiomatic({...props}: IdiomaticProps): JSX.Element {
|
||||||
|
props.bluelibClassNames = mergeClassNames(props.bluelibClassNames, "semantic-i")
|
||||||
|
|
||||||
|
return (
|
||||||
|
<BaseElement kind={"i"} {...props}/>
|
||||||
|
)
|
||||||
|
}
|
Loading…
Reference in a new issue