layercake icon indicating copy to clipboard operation
layercake copied to clipboard

HIgher level components

Open mhkeller opened this issue 1 year ago • 0 comments

I wonder what the place is for a collection of higher level components such as BarChart that would be the same as the current examples on the website but importable. You could still allow for similar customization by exposing chart components as props. Let's say that example has layer components like AxisX, AxisY and Bar. The workflow would be:

  1. Import BarChart to get something going quickly without pasting a lot of code
  2. As you get into customization, add your own Bar or AxisX component in your project and replace it like so
import Bar from './Bar.svelte';
import CustomAxisX from './AxisX.svelte';

<BarChart
  {Bar}
  AxisX={CustomAxisX}
/>

This may be a companion library and out of scope for this, though.

mhkeller avatar Jul 22 '22 15:07 mhkeller

I think I'll do this as a separate library called something like layercake-charts

mhkeller avatar Sep 06 '22 21:09 mhkeller