1
Fork 0
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:
Steffo 2021-08-24 13:26:28 +02:00
parent 4cb6ad30ea
commit e63750e41f
Signed by: steffo
GPG key ID: 6965406171929D01
2 changed files with 34 additions and 0 deletions

View 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 = {}

View 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}/>
)
}