diff --git a/Dockerfile b/Dockerfile index 93f63c17f41f..3f77785420ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,7 +51,6 @@ COPY content/index.md ./content/index.md COPY next.config.js ./next.config.js COPY tsconfig.json ./tsconfig.json -COPY next-env.d.ts ./next-env.d.ts RUN npm run build diff --git a/components/ui/TruncateLines/TruncateLines.module.scss b/components/ui/TruncateLines/TruncateLines.module.scss new file mode 100644 index 000000000000..8f981c6095d9 --- /dev/null +++ b/components/ui/TruncateLines/TruncateLines.module.scss @@ -0,0 +1,7 @@ +.truncated { + // Note that `-webkit-line-clamp` gets set by the component JSX + // manually with a `style` attribute. + display: -webkit-box; + -webkit-box-orient: vertical; + overflow: hidden; +} diff --git a/components/ui/TruncateLines/TruncateLines.tsx b/components/ui/TruncateLines/TruncateLines.tsx index 35c9a0e6d4d0..1c632c40bfbc 100644 --- a/components/ui/TruncateLines/TruncateLines.tsx +++ b/components/ui/TruncateLines/TruncateLines.tsx @@ -1,6 +1,8 @@ import React, { ReactNode } from 'react' import cx from 'classnames' +import styles from './TruncateLines.module.scss' + export type TruncateLinesPropsT = { as?: keyof JSX.IntrinsicElements maxLines: number @@ -11,16 +13,8 @@ export type TruncateLinesPropsT = { export const TruncateLines = (props: TruncateLinesPropsT) => { const { maxLines, className, children, as: Component = 'div' } = props return ( - + {children} - ) } diff --git a/next-env.d.ts b/next-env.d.ts index 9bc3dd46b9d9..4f11a03dc6cc 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -1,5 +1,4 @@ /// -/// /// // NOTE: This file should not be edited