diff --git a/components/molecule/breadcrumb/demo/ArticleCustomIcon.js b/components/molecule/breadcrumb/demo/ArticleCustomIcon.js index 8230993cf..19097ebc2 100644 --- a/components/molecule/breadcrumb/demo/ArticleCustomIcon.js +++ b/components/molecule/breadcrumb/demo/ArticleCustomIcon.js @@ -16,24 +16,25 @@ import { import MoleculeBreadcrumb from '../src/index.js' const getCustomTextIcon = text => props => text && {`${text}`}  -const getCustomIcon = icon => props => icon && +const getCustomIcon = icon => + icon !== undefined && (props => ) const ArticleCustomIcon = ({className, items}) => { - const [icon, setIcon] = useState(undefined) + const [iconID, setIconID] = useState(undefined) const [text, setText] = useState('/') return (

Custom Icon

- MoleculeBreadcrumb offers the oportunity to customize the separator icon between items through the{' '} + MoleculeBreadcrumb offers the opportunity to customize the separator icon between items through the{' '} icon prop, which might be a React component. - setIcon(value)}> + setIconID(value)}> {['AiFillCaretRight', 'AiOutlineCaretRight', 'AiOutlineDoubleRight', 'AiOutlineRight'].map((iconValue, key) => ( - + ))} - + Icon might be even a text (or string) Component node setText(event.target.value)} />