bmcmahen / sancho

Responsive and accessible React UI components built with Typescript
https://sancho-ui.com
411 stars 33 forks source link

Fix Props interfaces to be exported #50

Closed whitphx closed 4 years ago

whitphx commented 4 years ago

Hello, I want the *Props interfaces to be exported in order to extend the sancho's components like this:

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { Layer, LayerProps } from 'sancho';

interface DecoratedLayerProps extends LayerProps {
  backgroundColor: string;
}
export const DecoratedLayer: React.FC<DecoratedLayerProps> = props => {
  const { backgroundColor, ...restProps } = props;

  return (
    <Layer
      css={{
        backgroundColor,
      }}
      {...restProps}
    />
  );
};
bmcmahen commented 4 years ago

Roger that 👍