Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Props interfaces to be exported #50

Merged
merged 1 commit into from
Jan 21, 2020

Conversation

whitphx
Copy link
Contributor

@whitphx whitphx commented Jan 19, 2020

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
Copy link
Owner

Roger that 👍

@bmcmahen bmcmahen merged commit 5903905 into bmcmahen:master Jan 21, 2020
@whitphx whitphx deleted the fix/export-props-interfaces branch January 21, 2020 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants