Skip to content

Commit

Permalink
chore: Adjust styles, pass classNames
Browse files Browse the repository at this point in the history
  • Loading branch information
LizBaker committed Jun 2, 2021
1 parent 2d14d2a commit 5ff0def
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 4 additions & 1 deletion src/components/PageLayout/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import React from 'react';
import PropTypes from 'prop-types';
import { css } from '@emotion/react';

const Header = ({ title, children }) => (
const Header = ({ title, children, className }) => (
<header
className={className}
css={css`
grid-area: page-header;
display: flex;
flex-wrap: wrap;
align-items: baseline;
justify-content: space-between;
border-bottom: 1px solid var(--divider-color);
Expand Down Expand Up @@ -37,6 +39,7 @@ const Header = ({ title, children }) => (
);

Header.propTypes = {
className: PropTypes.string,
children: PropTypes.node,
title: PropTypes.string.isRequired,
};
Expand Down
7 changes: 5 additions & 2 deletions src/components/Tabs/Bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ MobileTabControl.propTypes = {
children: PropTypes.node.isRequired,
};

const Bar = ({ children }) => {
const Bar = ({ children, className }) => {
const detectMobile = useMobileDetect();
const isMobile = detectMobile.isMobile();

Expand All @@ -53,11 +53,13 @@ const Bar = ({ children }) => {

return (
<div
className={className}
role="tablist"
css={css`
display: flex;
width: 100%;
margin-bottom: 1em;
overflow: scroll;
overflow: auto;
`}
>
{React.Children.map(children, (child, index) =>
Expand All @@ -69,6 +71,7 @@ const Bar = ({ children }) => {

Bar.propTypes = {
children: PropTypes.node.isRequired,
className: PropTypes.string,
};

export default Bar;
3 changes: 1 addition & 2 deletions src/components/Tabs/BarItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ const BarItem = ({ index, children, id, count, disabled }) => {
user-select: none;
white-space: nowrap;
.dark-mode & {
border-bottom-color: var(--color-dark-300);
}
Expand Down Expand Up @@ -123,7 +122,7 @@ const BarItem = ({ index, children, id, count, disabled }) => {
};

BarItem.propTypes = {
index: PropTypes.number.isRequired,
index: PropTypes.number,
children: PropTypes.node.isRequired,
id: PropTypes.string.isRequired,
count: PropTypes.number,
Expand Down

0 comments on commit 5ff0def

Please sign in to comment.