Skip to content

Commit 09fa7d1

Browse files
jphawkElena Kazakova
andauthored
Add improvements for tabs and box (#105)
* Add Messages * Add story improvements * Add index.ts which didn't update * Update Message.stories.mdx * Update Message.tsx * Add icon fix * Add improvements for Tabs and Box * No empty interface Co-authored-by: Elena Kazakova <[email protected]>
1 parent 2643c7f commit 09fa7d1

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/components/box/Box.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ type BoxProps = {
3131
| "spacing07"
3232
| "spacing08";
3333
shadow?: "shadow01" | "shadow02" | "shadow03" | "shadow04";
34-
34+
onClick?: (e: any) => void;
35+
onChange?: (e: React.FormEvent<HTMLInputElement>) => void;
3536
children?: React.ReactNode;
3637
};
3738

src/components/tabs/Tabs.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ interface ButtonNextProps {
4040
onClick?: (e: any) => void;
4141
}
4242

43-
const TabsContent = styled(Box)`
43+
export const TabsContent = styled(Box)`
4444
background-color: ${theme.colors.snowwhite};
4545
border-top: ${theme.borders.grey};
4646
border-top-left-radius: 0;
@@ -58,7 +58,7 @@ const TabsContent = styled(Box)`
5858
}
5959
`;
6060

61-
const TabContainer: any = styled.li<TabProps>`
61+
export const TabContainer: any = styled.li<TabProps>`
6262
display: inline-block;
6363
list-style: none;
6464
margin-bottom: -1px;
@@ -248,3 +248,10 @@ export const Tabs: FunctionComponent<TabsProps> = ({
248248
</TabsWrapper>
249249
);
250250
};
251+
252+
export const StyledTab: FunctionComponent<ButtonNextProps> = ({
253+
onClick,
254+
children,
255+
}) => {
256+
return <NextButton onClick={onClick}>{children}</NextButton>;
257+
};

0 commit comments

Comments
 (0)