Skip to content
Snippets Groups Projects
Commit 5fd4b152 authored by Atte Keinänen's avatar Atte Keinänen
Browse files

Add bottom border to the active tab

parent 04a25570
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@ export default class DatabaseEditForms extends Component {
let errors = {};
return (
<div>
<div className="mt4">
<div className={cx("Form-field", {"Form--fieldError": errors["engine"]})}>
<label className="Form-label Form-offset">Database type: <span>{errors["engine"]}</span></label>
<label className="Select Form-offset mt1">
......
......@@ -36,12 +36,18 @@ const mapStateToProps = (state, props) => ({
formState: getFormState(state, props)
});
export const Tab = ({ name, setTab, currentTab }) =>
<div
className={cx('cursor-pointer py3', {'text-brand': currentTab === name.toLowerCase() })}
onClick={() => setTab(name)}>
<h3>{name}</h3>
</div>
export const Tab = ({ name, setTab, currentTab }) => {
const isCurrentTab = currentTab === name.toLowerCase()
return (
<div
className={cx('cursor-pointer py2', {'text-brand': isCurrentTab })}
style={isCurrentTab ? { borderBottom: "3px solid #2D86D4" } : {}}
onClick={() => setTab(name)}>
<h3>{name}</h3>
</div>
)
}
export const Tabs = ({ currentTab, setTab }) =>
<div className="border-bottom">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment