wip: Bunch of changes for v4
From the top of my head (but I'll write this up later): - We keep the info about the designs in the design - We use a new about.json file for this - The auto-generated data.mjs file is no more - Linedrawings we use in the design picker use the front - Linedrawings should respect square aspect ration - Migrated components to use the 'tw-' prefic for tailwind CSS classes to avoid conflicts with docusaurus styles
This commit is contained in:
parent
6b8eea2724
commit
c8808695e5
255 changed files with 3038 additions and 2304 deletions
|
@ -1,39 +1,38 @@
|
|||
import React from 'react'
|
||||
import { LineDrawingWrapper, thin, regular, dashed } from './shared.mjs'
|
||||
|
||||
const strokeScale = 0.5
|
||||
|
||||
export const Cornelius = ({
|
||||
className = 'w-64', // CSS classes to apply
|
||||
stroke = 1, // Stroke width to use
|
||||
}) => {
|
||||
// Normalize stroke across designs
|
||||
stroke = stroke * strokeScale
|
||||
|
||||
return (
|
||||
<LineDrawingWrapper viewBox="0 0 320 218" {...{ className, stroke }}>
|
||||
<Front stroke={stroke} />
|
||||
<Back stroke={stroke} />
|
||||
</LineDrawingWrapper>
|
||||
)
|
||||
}
|
||||
|
||||
/*
|
||||
* React component for the front
|
||||
* This strokeScale factor is used to normalize the stroke across
|
||||
* designs so we have a consistent look when showing our collection
|
||||
*/
|
||||
export const CorneliusFront = ({
|
||||
className = 'w-64', // CSS classes to apply
|
||||
stroke = 1, // Stroke width to use
|
||||
}) => {
|
||||
// Normalize stroke across designs
|
||||
stroke = stroke * strokeScale
|
||||
const strokeScale = 1
|
||||
|
||||
return (
|
||||
<LineDrawingWrapper viewBox="0 0 160 218" {...{ className, stroke }}>
|
||||
<Front stroke={stroke} />
|
||||
</LineDrawingWrapper>
|
||||
)
|
||||
}
|
||||
/**
|
||||
* A linedrawing component for Cornelius
|
||||
*
|
||||
* @param {object} props - All React props
|
||||
* @param {string} props.className - Any CSS classes to apply
|
||||
* @param {number} props.stroke - The stroke width to apply
|
||||
*/
|
||||
export const Cornelius = ({ className, stroke = 1 }) => (
|
||||
<LineDrawingWrapper viewBox="0 0 320 218" {...{ className, stroke }}>
|
||||
<Front stroke={stroke * strokeScale} />
|
||||
<Back stroke={stroke * strokeScale} />
|
||||
</LineDrawingWrapper>
|
||||
)
|
||||
|
||||
/**
|
||||
* A linedrawing component for the front of Cornelius
|
||||
*
|
||||
* @param {object} props - All React props
|
||||
* @param {string} props.className - Any CSS classes to apply
|
||||
* @param {number} props.stroke - The stroke width to apply
|
||||
*/
|
||||
export const CorneliusFront = ({ className, stroke = 1 }) => (
|
||||
<LineDrawingWrapper viewBox="-30 0 215 215" {...{ className, stroke }}>
|
||||
<Front stroke={stroke * strokeScale} />
|
||||
</LineDrawingWrapper>
|
||||
)
|
||||
|
||||
/*
|
||||
* React component for the back
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue