Skip to content

Commit

Permalink
Increase tab size (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
chriszarate authored Dec 2, 2020
1 parent 089e31e commit fd206f0
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 41 deletions.
40 changes: 0 additions & 40 deletions src/components/TabNav/TabNav.jsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/components/TabNav/TabNav.scss
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
}

.tab {
@include fonts.maison-extended-700-1;
@include fonts.maison-extended-700-2;

margin: 0 12px;
padding: 16px 0 14px;
Expand Down
36 changes: 36 additions & 0 deletions src/components/TabNav/TabNav.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import React from 'react';
import styles from './TabNav.scss';

function TabNav ( props: {
/**
* Child node to be rendered as the inner HTML of the component.
*/
children: React.ReactNode,
} ) {
return (
<nav className={styles.container}>
<div className={styles[ 'scroll-container' ]}>
<ul className={styles.tablist}>
{props.children}
</ul>
</div>
</nav>
);
}

function TabNavItem ( props: {
/**
* Child node to be rendered as the inner HTML of the component.
*/
children: React.ReactNode,

/**
* Whether this is the currently active tab. Applies
* `aria-current="true"`. Only one tab may be active at a time.
*/
isActive: boolean,
} ) {
return <li aria-current={props.isActive} className={styles.tab}>{props.children}</li>;
}

export { TabNav, TabNavItem };

0 comments on commit fd206f0

Please sign in to comment.