-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
130 changed files
with
3,528 additions
and
878 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,36 @@ | ||
import classNames from "classnames"; | ||
import PropTypes from "prop-types"; | ||
import React from "react"; | ||
|
||
import { forwardRefAs, HelpersProps, transformHelpers } from "../../base"; | ||
import { | ||
forwardRefAs, | ||
genericPropTypes, | ||
HelpersProps, | ||
transformHelpers, | ||
} from "../../base"; | ||
|
||
export interface BreadcrumbItemModifierProps { | ||
active?: boolean; | ||
} | ||
|
||
export type BreadcrumbItemProps = HelpersProps & BreadcrumbItemModifierProps; | ||
|
||
export const BreadcrumbItem = forwardRefAs<BreadcrumbItemProps, "a">( | ||
(props, ref) => { | ||
const { as, active, ...rest } = transformHelpers(props); | ||
return ( | ||
<li className={classNames({ "is-active": active }) || undefined}> | ||
{React.createElement(as!, { ref, ...rest })} | ||
</li> | ||
); | ||
}, | ||
{ as: "a" }, | ||
const propTypes = { | ||
...genericPropTypes, | ||
active: PropTypes.bool, | ||
}; | ||
|
||
export const BreadcrumbItem = Object.assign( | ||
forwardRefAs<BreadcrumbItemProps, "a">( | ||
(props, ref) => { | ||
const { as, active, ...rest } = transformHelpers(props); | ||
return ( | ||
<li className={classNames({ "is-active": active }) || undefined}> | ||
{React.createElement(as!, { ref, ...rest })} | ||
</li> | ||
); | ||
}, | ||
{ as: "a" }, | ||
), | ||
{ propTypes }, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
import classNames from "classnames"; | ||
import React from "react"; | ||
|
||
import { forwardRefAs, HelpersProps, transformHelpers } from "../../base"; | ||
import { | ||
forwardRefAs, | ||
genericPropTypes, | ||
HelpersProps, | ||
transformHelpers, | ||
} from "../../base"; | ||
|
||
export type CardContentModifierProps = Partial<{ className: string }>; | ||
export type CardContentProps = HelpersProps; | ||
|
||
export type CardContentProps = HelpersProps & CardContentModifierProps; | ||
|
||
export const CardContent = forwardRefAs<CardContentProps, "div">( | ||
(props, ref) => { | ||
const { as, ...rest } = transformHelpers(props); | ||
rest.className = classNames("card-content", rest.className); | ||
return React.createElement(as!, { ref, ...rest }); | ||
}, | ||
{ as: "div" }, | ||
export const CardContent = Object.assign( | ||
forwardRefAs<CardContentProps, "div">( | ||
(props, ref) => { | ||
const { as, ...rest } = transformHelpers(props); | ||
rest.className = classNames("card-content", rest.className); | ||
return React.createElement(as!, { ref, ...rest }); | ||
}, | ||
{ as: "div" }, | ||
), | ||
{ propTypes: genericPropTypes }, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,23 @@ | ||
import classNames from "classnames"; | ||
import React from "react"; | ||
|
||
import { forwardRefAs, HelpersProps, transformHelpers } from "../../base"; | ||
import { | ||
forwardRefAs, | ||
genericPropTypes, | ||
HelpersProps, | ||
transformHelpers, | ||
} from "../../base"; | ||
|
||
export type CardFooterItemModifierProps = Partial<{ className: string }>; | ||
export type CardFooterItemProps = HelpersProps & CardFooterItemModifierProps; | ||
export type CardFooterItemProps = HelpersProps; | ||
|
||
export const CardFooterItem = forwardRefAs<CardFooterItemProps, "div">( | ||
(props, ref) => { | ||
const { as, ...rest } = transformHelpers(props); | ||
rest.className = classNames("card-footer-item", rest.className); | ||
return React.createElement(as!, { ref, ...rest }); | ||
}, | ||
{ as: "div" }, | ||
export const CardFooterItem = Object.assign( | ||
forwardRefAs<CardFooterItemProps, "div">( | ||
(props, ref) => { | ||
const { as, ...rest } = transformHelpers(props); | ||
rest.className = classNames("card-footer-item", rest.className); | ||
return React.createElement(as!, { ref, ...rest }); | ||
}, | ||
{ as: "div" }, | ||
), | ||
{ propTypes: genericPropTypes }, | ||
); |
Oops, something went wrong.