wip(shared): Changes to layouts
This will break the org build, but we need to rip out sanity anyway so I don't think it's worth obsessing over it now. I've essentially changes the default layout and added a new navigation component.
This commit is contained in:
parent
8b79de2bd6
commit
5a9f2f8d40
26 changed files with 318 additions and 172 deletions
|
@ -9,11 +9,13 @@ import { Pattern, PatternXray } from '@freesewing/react-components'
|
|||
|
||||
// Get code from children
|
||||
export const asText = (reactEl) => {
|
||||
if (typeof reactEl.props.children === 'string') return reactEl.props.children
|
||||
if (Array.isArray(reactEl.props.children)) {
|
||||
return reactEl.props.children.map((el) => (typeof el === 'string' ? el : asText(el))).join('')
|
||||
if (reactEl) {
|
||||
if (typeof reactEl.props.children === 'string') return reactEl.props.children
|
||||
if (Array.isArray(reactEl.props.children)) {
|
||||
return reactEl.props.children.map((el) => (typeof el === 'string' ? el : asText(el))).join('')
|
||||
}
|
||||
if (typeof reactEl.props.children === 'object') return asText(reactEl.props.children)
|
||||
}
|
||||
if (typeof reactEl.props.children === 'object') return asText(reactEl.props.children)
|
||||
|
||||
return ''
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue