vulcan-npm icon indicating copy to clipboard operation
vulcan-npm copied to clipboard

component override

Open SachaG opened this issue 3 years ago • 2 comments

SachaG avatar Sep 30 '22 00:09 SachaG

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
vulcan-docs ✅ Ready (Inspect) Visit Preview Sep 30, 2022 at 0:37AM (UTC)
vulcan-npm ❌ Failed (Inspect) Sep 30, 2022 at 0:37AM (UTC)

vercel[bot] avatar Sep 30 '22 00:09 vercel[bot]

Not needed imo, this is equivalent to what your are trying to achieve

// eg if Loading allows to override its Button locally
const Loading = ({components}: { components: Partial<Pick<VulcanCoreComponents, "Button">>) => {
  const VulcanComponents = useVulcanComponents()
  const Components = {...components, ...VulcanComponents }
  return (<Components.Button>Loading...</Components.Button>)
}

eric-burel avatar Sep 30 '22 08:09 eric-burel