Hans
Hans
Explore posts from servers
TtRPC
Created by Hans on 3/20/2024 in #❓-help
Errors not caught in procedures
It's not a bug it's a feature! I think it would be good to propagate this knowledge into the docs. I'll put updating the docs for the client with a page about error handling on my TODO list.
4 replies
TtRPC
Created by Hans on 3/20/2024 in #❓-help
Errors not caught in procedures
Github issue link on tRPC repository: https://github.com/trpc/trpc/issues/5576
4 replies
SSolidJS
Created by Hans on 5/30/2023 in #support
Solid-js design system CSS troubleshooting
I figured it out. I need to import the compiled stylesheet from the design system in the consuming app.
import '@swiftmind/design-system/dist/style.css'
import '@swiftmind/design-system/dist/style.css'
7 replies
SSolidJS
Created by Hans on 5/30/2023 in #support
Solid-js design system CSS troubleshooting
accordion.module.css
.accordion-root {
background-color: #fff;
}
.accordion-root {
background-color: #fff;
}
Accordion.tsx
import { Accordion } from '@kobalte/core'
import { For, JSX } from 'solid-js'
import { accordionRoot } from './accordion.module.css'

interface AccordionProps {
sections: [string, JSX.Element | string][]
}

const DSAccordion = ({ sections }: AccordionProps) => {
return (
<div class={accordionRoot}>
{/* The rest of my accordion component */}
</div>
)
}

export default DSAccordion
import { Accordion } from '@kobalte/core'
import { For, JSX } from 'solid-js'
import { accordionRoot } from './accordion.module.css'

interface AccordionProps {
sections: [string, JSX.Element | string][]
}

const DSAccordion = ({ sections }: AccordionProps) => {
return (
<div class={accordionRoot}>
{/* The rest of my accordion component */}
</div>
)
}

export default DSAccordion
vite.config.ts
import { resolve } from 'path'
import { defineConfig } from 'vite'
import dts from 'vite-plugin-dts'
import solid from 'vite-plugin-solid'

export default defineConfig({
plugins: [
solid(),
dts({
insertTypesEntry: true,
}),
],
css: {
modules: {
localsConvention: 'camelCaseOnly',
},
},
build: {
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/index.tsx'),
name: 'design-system',
// the proper extensions will be added
fileName: 'index',
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['@kobalte/core'],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
'@kobalte/core': '@kobalte/core',
},
},
},
},
})
import { resolve } from 'path'
import { defineConfig } from 'vite'
import dts from 'vite-plugin-dts'
import solid from 'vite-plugin-solid'

export default defineConfig({
plugins: [
solid(),
dts({
insertTypesEntry: true,
}),
],
css: {
modules: {
localsConvention: 'camelCaseOnly',
},
},
build: {
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/index.tsx'),
name: 'design-system',
// the proper extensions will be added
fileName: 'index',
},
rollupOptions: {
// make sure to externalize deps that shouldn't be bundled
// into your library
external: ['@kobalte/core'],
output: {
// Provide global variables to use in the UMD build
// for externalized deps
globals: {
'@kobalte/core': '@kobalte/core',
},
},
},
},
})
7 replies