Skip to content
This repository has been archived by the owner on Feb 13, 2023. It is now read-only.

Commit

Permalink
Cleans up the Dropdown files and reverts the Bulm version being pulle…
Browse files Browse the repository at this point in the history
…d from the CDN for the docs
  • Loading branch information
omgaunicorn authored and AlgusDark committed Nov 13, 2017
1 parent 1d66cd8 commit f1c7c95
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 8 deletions.
4 changes: 2 additions & 2 deletions docs/index.html
Expand Up @@ -41,7 +41,7 @@
<meta name="description" content="Bloomer — A set of React Stateless components for Bulma">
<meta name="author" content="Algus Dark">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.5.1/css/bulma.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.3/css/bulma.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atelier-heath-light.min.css">
<link href="dist/main.7d60389b.css" rel="stylesheet"></head>
Expand All @@ -56,4 +56,4 @@
<script async defer id="twitter-wjs" src="https://platform.twitter.com/widgets.js"></script>
<script type="text/javascript" src="dist/vendor.4490f8c1.js" defer></script><script type="text/javascript" src="dist/main.4490f8c1.js" defer></script></body>

</html>
</html>
9 changes: 9 additions & 0 deletions docs/src/Scenes/Documentation/Components/Scenes/Dropdown.tsx
Expand Up @@ -29,6 +29,14 @@ const DropdownRows: Docs.Row[] = [
},
];

const DropdownItemRows: Docs.Row[] = [
{
description: <td>Highlights the row</td>,
prop: 'isActive',
type: 'boolean',
},
];

const DropdownBasic = ({ isDropdownOpen, openDropdown }) => (
<Dropdown>
<DropdownTrigger onClick={openDropdown}>
Expand Down Expand Up @@ -119,6 +127,7 @@ class DropdownDocs extends React.Component<{}, { isDropdownOpen: boolean }> {
but it will render an <strong>{'<a/>'}</strong> element if you provide <strong>href</strong> prop.
<strong>E.g.</strong> <em><strong>{'<DropdownItem href="#" />'}</strong></em>.
</Subtitle>
<TableDocs rows={DropdownItemRows} />
</Container>
);
}
Expand Down
4 changes: 2 additions & 2 deletions docs/src/index.html
Expand Up @@ -41,7 +41,7 @@
<meta name="description" content="Bloomer — A set of React Stateless components for Bulma">
<meta name="author" content="Algus Dark">

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.5.1/css/bulma.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.4.3/css/bulma.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atelier-heath-light.min.css">
</head>
Expand All @@ -55,4 +55,4 @@
<script async defer id="twitter-wjs" src="https://platform.twitter.com/widgets.js"></script>
</body>

</html>
</html>
8 changes: 4 additions & 4 deletions src/components/Dropdown/Menu/DropdownItem.tsx
Expand Up @@ -5,7 +5,7 @@ import {
Bulma,
getActiveModifiers,
removeActiveModifiers,
withHelpersModifiers
withHelpersModifiers,
} from './../../../bulma';
import { getHTMLProps } from './../../../helpers';

Expand All @@ -20,11 +20,11 @@ export function DropdownItem({ tag = 'div', render, ...props }: DropdownItem<HTM
props.className,
) || undefined;

const HTMLProps = getHTMLProps(props, removeActiveModifiers);
const HTMLProps = getHTMLProps(props, removeActiveModifiers);

if (render) return render({ ...HTMLProps, className });
if (render) return render({ ...HTMLProps, className });

return React.createElement((props.href ? 'a' : tag), { ...HTMLProps, className });
return React.createElement((props.href ? 'a' : tag), { ...HTMLProps, className });
}

const HOC = /*@__PURE__*/withHelpersModifiers(DropdownItem);
Expand Down

0 comments on commit f1c7c95

Please sign in to comment.