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

Eb/자주쓰이는 atom component 구현 및 molecule component 일부 구현 #98

Merged
merged 11 commits into from
Nov 5, 2020
Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import React from 'react';
import { text } from '@storybook/addon-knobs';
import FilterItemLabel from './FilterItemLabel';

export default {
title: 'Molecules/FilterItemLabel',
component: FilterItemLabel,
};

export const Default = () => {
const swatchColor = text('swatch color', '#eee');
const title = text('title', 'bug');
const description = text('description', "Something isn't working");

return (
<FilterItemLabel
swatchColor={swatchColor}
title={title}
description={description}
/>
);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React, { FunctionComponent } from 'react';
import ColorSwatch from '@components/atoms/filterItem/ColorSwatch';
import Description from '@/components/atoms/filterItem/Description';
import Title from '@/components/atoms/filterItem/Title';
Eunbin-Kim marked this conversation as resolved.
Show resolved Hide resolved

interface Props {
swatchColor: string;
title: string;
description?: string;
}

const FilterItemLabel: FunctionComponent<Props> = ({
swatchColor,
title,
description,
}) => (
<>
<ColorSwatch bgColor={swatchColor} />
<div>
<Title text={title} />
<Description text={description} />
</div>
</>
);

export default FilterItemLabel;
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from './FilterItemLabel';