-
-
Notifications
You must be signed in to change notification settings - Fork 193
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
1 parent
e79188c
commit a551b56
Showing
31 changed files
with
1,590 additions
and
839 deletions.
There are no files selected for viewing
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
14 changes: 14 additions & 0 deletions
14
packages/embla-carousel-docs/src/components/Mdx/Components/Blockquote.tsx
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import styled from 'styled-components' | ||
import { COLORS } from 'consts/themes' | ||
import { SPACINGS } from 'consts/spacings' | ||
import { BORDER_SIZES } from 'consts/border' | ||
|
||
export const Blockquote = styled.blockquote` | ||
padding-left: ${SPACINGS.FOUR}; | ||
border-left: ${BORDER_SIZES.ACCENT_VERTICAL} solid | ||
${COLORS.DETAIL_LOW_CONTRAST}; | ||
> *:last-child { | ||
margin-bottom: 0; | ||
} | ||
` |
18 changes: 18 additions & 0 deletions
18
packages/embla-carousel-docs/src/components/Mdx/Components/Hr.tsx
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import styled from 'styled-components' | ||
import { COLORS } from 'consts/themes' | ||
import { BORDER_SIZES } from 'consts/border' | ||
import { SPACINGS } from 'consts/spacings' | ||
import { HEADING_TOP_SPACING } from '../Styles/heading' | ||
|
||
const DECORATION_WIDTH = SPACINGS.CUSTOM(({ EIGHT }) => EIGHT + 0.2) | ||
|
||
export const Hr = styled.hr` | ||
border-top: 0; | ||
border-right: 0; | ||
border-left: 0; | ||
border-bottom: ${BORDER_SIZES.DETAIL} solid ${COLORS.DETAIL_MEDIUM_CONTRAST}; | ||
margin-top: ${HEADING_TOP_SPACING}; | ||
margin-bottom: ${HEADING_TOP_SPACING}; | ||
width: ${DECORATION_WIDTH}; | ||
background-color: ${COLORS.DETAIL_MEDIUM_CONTRAST}; | ||
` |
15 changes: 14 additions & 1 deletion
15
packages/embla-carousel-docs/src/components/Mdx/Components/Link.tsx
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,12 +1,25 @@ | ||
import React, { AnchorHTMLAttributes } from 'react' | ||
import styled, { css } from 'styled-components' | ||
import { CODE_HIGHLIGHT_CLASS_NAME } from './Code' | ||
import { BRAND_GRADIENT_TEXT_STYLES } from 'consts/gradients' | ||
import { LinkContent } from 'components/Link/LinkContent' | ||
import { LinkBare } from 'components/Link/LinkBare' | ||
|
||
const linkStyles = css` | ||
.${CODE_HIGHLIGHT_CLASS_NAME} > span { | ||
${BRAND_GRADIENT_TEXT_STYLES}; | ||
} | ||
` | ||
|
||
const LinkContentStyled = styled(LinkContent)` | ||
${linkStyles}; | ||
` | ||
|
||
type PropType = AnchorHTMLAttributes<HTMLAnchorElement> | ||
|
||
export const Link = (props: PropType) => { | ||
const { className, href = '' } = props | ||
const classList = className?.split(' ') || [] | ||
const Link = classList.indexOf('anchor') > -1 ? LinkBare : LinkContent | ||
const Link = classList.indexOf('anchor') > -1 ? LinkBare : LinkContentStyled | ||
return <Link to={href} {...props} /> | ||
} |
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
16 changes: 0 additions & 16 deletions
16
packages/embla-carousel-docs/src/components/Mdx/Styles/blockquote.ts
This file was deleted.
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
20 changes: 0 additions & 20 deletions
20
packages/embla-carousel-docs/src/components/Mdx/Styles/hr.ts
This file was deleted.
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
9 changes: 0 additions & 9 deletions
9
packages/embla-carousel-docs/src/components/Mdx/Styles/link.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.