mirror of
https://github.com/Steffo99/bluelib.git
synced 2024-12-22 11:34:21 +00:00
✨ Add todo
panels
This commit is contained in:
parent
a6709dd335
commit
d72dc52fda
8 changed files with 63 additions and 9 deletions
|
@ -15,6 +15,9 @@ export default {
|
|||
disabled: {
|
||||
control: {type: "boolean"},
|
||||
},
|
||||
todo: {
|
||||
defaultValue: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -59,3 +62,9 @@ export const NestedMultiple = props => (
|
|||
NestedMultiple.args = {
|
||||
disabled: false,
|
||||
}
|
||||
|
||||
|
||||
export const Todo = Default.bind({})
|
||||
Todo.args = {
|
||||
todo: true,
|
||||
}
|
||||
|
|
|
@ -8,8 +8,12 @@ import mergeClassNames from "classnames"
|
|||
export interface BoxProps extends PanelProps {}
|
||||
|
||||
|
||||
export function Box({...props}: BoxProps): JSX.Element {
|
||||
props.bluelibClassNames = mergeClassNames(props.bluelibClassNames, "panel-box")
|
||||
export function Box({todo, ...props}: BoxProps): JSX.Element {
|
||||
if(todo) {
|
||||
console.warn(`TODO: ${props.children}`)
|
||||
}
|
||||
|
||||
props.bluelibClassNames = mergeClassNames(props.bluelibClassNames, "panel-box", todo ? "todo" : "")
|
||||
|
||||
return (
|
||||
<Panel {...props}/>
|
||||
|
|
|
@ -15,6 +15,9 @@ export default {
|
|||
disabled: {
|
||||
control: {type: "boolean"},
|
||||
},
|
||||
todo: {
|
||||
defaultValue: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -59,3 +62,9 @@ export const NestedMultiple = props => (
|
|||
NestedMultiple.args = {
|
||||
disabled: false,
|
||||
}
|
||||
|
||||
|
||||
export const Todo = Default.bind({})
|
||||
Todo.args = {
|
||||
todo: true,
|
||||
}
|
||||
|
|
|
@ -8,8 +8,12 @@ import mergeClassNames from "classnames"
|
|||
export interface DialogProps extends PanelProps {}
|
||||
|
||||
|
||||
export function Dialog({...props}: DialogProps): JSX.Element {
|
||||
props.bluelibClassNames = mergeClassNames(props.bluelibClassNames, "panel-dialog")
|
||||
export function Dialog({todo, ...props}: DialogProps): JSX.Element {
|
||||
if(todo) {
|
||||
console.warn(`TODO: ${props.children}`)
|
||||
}
|
||||
|
||||
props.bluelibClassNames = mergeClassNames(props.bluelibClassNames, "panel-dialog", todo ? "todo" : "")
|
||||
|
||||
return (
|
||||
<Panel {...props}/>
|
||||
|
|
|
@ -15,6 +15,9 @@ export default {
|
|||
disabled: {
|
||||
control: {type: "boolean"},
|
||||
},
|
||||
todo: {
|
||||
defaultValue: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -59,3 +62,9 @@ export const NestedMultiple = props => (
|
|||
NestedMultiple.args = {
|
||||
disabled: false,
|
||||
}
|
||||
|
||||
|
||||
export const Todo = Default.bind({})
|
||||
Todo.args = {
|
||||
todo: true,
|
||||
}
|
||||
|
|
|
@ -5,11 +5,17 @@ import {BaseElement} from "../BaseElement"
|
|||
import mergeClassNames from "classnames"
|
||||
|
||||
|
||||
export interface PanelProps extends Types.BluelibHTMLProps<HTMLElement> {}
|
||||
export interface PanelProps extends Types.BluelibHTMLProps<HTMLElement> {
|
||||
todo?: boolean,
|
||||
}
|
||||
|
||||
|
||||
export function Panel({...props}: PanelProps): JSX.Element {
|
||||
props.bluelibClassNames = mergeClassNames(props.bluelibClassNames, "panel")
|
||||
export function Panel({todo, ...props}: PanelProps): JSX.Element {
|
||||
if(todo) {
|
||||
console.warn(`TODO: ${props.children}`)
|
||||
}
|
||||
|
||||
props.bluelibClassNames = mergeClassNames(props.bluelibClassNames, "panel", todo ? "todo" : "")
|
||||
|
||||
return (
|
||||
<BaseElement kind={"section"} {...props}/>
|
||||
|
|
|
@ -15,6 +15,9 @@ export default {
|
|||
disabled: {
|
||||
control: {type: "boolean"},
|
||||
},
|
||||
todo: {
|
||||
defaultValue: false,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -59,3 +62,9 @@ export const NestedMultiple = props => (
|
|||
NestedMultiple.args = {
|
||||
disabled: false,
|
||||
}
|
||||
|
||||
|
||||
export const Todo = Default.bind({})
|
||||
Todo.args = {
|
||||
todo: true,
|
||||
}
|
||||
|
|
|
@ -8,8 +8,12 @@ import mergeClassNames from "classnames"
|
|||
export interface ParenthesisProps extends PanelProps {}
|
||||
|
||||
|
||||
export function Parenthesis({...props}: ParenthesisProps): JSX.Element {
|
||||
props.bluelibClassNames = mergeClassNames(props.bluelibClassNames, "panel-parenthesis")
|
||||
export function Parenthesis({todo, ...props}: ParenthesisProps): JSX.Element {
|
||||
if(todo) {
|
||||
console.warn(`TODO: ${props.children}`)
|
||||
}
|
||||
|
||||
props.bluelibClassNames = mergeClassNames(props.bluelibClassNames, "panel-parenthesis", todo ? "todo" : "")
|
||||
|
||||
return (
|
||||
<Panel {...props}/>
|
||||
|
|
Loading…
Reference in a new issue