-
Notifications
You must be signed in to change notification settings - Fork 145
Expand file tree
/
Copy pathfoundry.config.ts
More file actions
64 lines (63 loc) · 1.92 KB
/
Copy pathfoundry.config.ts
File metadata and controls
64 lines (63 loc) · 1.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import { defineConfig } from 'react-foundry';
import tsconfigPaths from 'vite-tsconfig-paths';
import tailwindcss from '@tailwindcss/vite';
export default defineConfig({
previews: 'src/components/base/**/*.preview.tsx',
title: 'Hive Console Components',
// Declaration order is display order, so this groups the shelf by kind rather than
// alphabetically. It also narrows `NavPath` to these exact paths, which turns a typo in
// a preview's `nav` export into a type error instead of a stray top-level group.
nav: [
{
label: 'Base',
children: [
{
label: 'Primitives',
children: [
{ label: 'Accordion' },
{ label: 'Badge' },
{ label: 'Button' },
{ label: 'Card' },
{ label: 'Input' },
],
},
{
label: 'FormControls',
children: [
{ label: 'Checkbox' },
{ label: 'RadioGroup' },
{ label: 'Switch' },
{ label: 'Form' },
],
},
{
label: 'Floating',
children: [
{ label: 'Menu' },
{ label: 'Popover' },
{ label: 'Select' },
{ label: 'FilterDropdown' },
{ label: 'FilterMenu' },
{ label: 'Search' },
],
},
// Data and layout
{ label: 'DataTable' },
{ label: 'DescriptionList' },
{ label: 'PageLead' },
],
},
],
theme: {
colors: {
light: { canvas: 'var(--color-neutral-3)' },
dark: { canvas: 'var(--color-neutral-2)' },
},
},
viteConfig: {
// Foundry's vite root is inside node_modules and this config is bundled to a cache
// dir before it runs, so neither location can anchor tsconfig discovery. cwd is the
// app directory, which is where `foundry dev` is invoked from.
plugins: [tsconfigPaths({ root: process.cwd() }), tailwindcss()],
},
});