Skip to content

Commit

Permalink
Merge branch 'next'
Browse files Browse the repository at this point in the history
  • Loading branch information
kellyjosephprice committed Nov 7, 2024
2 parents d8d2a25 + 1a3625a commit 08d7a38
Show file tree
Hide file tree
Showing 7 changed files with 239 additions and 101 deletions.
6 changes: 3 additions & 3 deletions __tests__/migration/tables.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ ${JSON.stringify(
| ------------------------------------------------------------------ |
| <p>¿Necesitas ayuda?</p><p>‍</p><p>Llámanos al +52 33 11224455</p> |
`;
const mdx = rmdx.mdx(rmdx.mdastV6(md));
const mdx = migrate(md);

expect(mdx).toMatchInlineSnapshot(`
"<Table>
Expand Down Expand Up @@ -386,7 +386,7 @@ ${JSON.stringify(
[/block]
`;

const mdx = rmdx.mdx(rmdx.mdastV6(md));
const mdx = migrate(md);

expect(mdx).toMatchInlineSnapshot(`
"<Table align={["left","left","left"]}>
Expand Down Expand Up @@ -450,7 +450,7 @@ ${JSON.stringify(
[/block]
`;

const mdx = rmdx.mdx(rmdx.mdastV6(md));
const mdx = migrate(md);

expect(mdx).toMatchInlineSnapshot(`
"<Table align={["left","left"]}>
Expand Down
20 changes: 20 additions & 0 deletions components/Columns/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';

import './style.scss';

export const Column = ({ children }) => {
return (
<div className="Column">{children}</div>
)
}

const Columns = ({ children, columns = 2, layout = 'auto'}) => {
layout = layout === 'fixed' ? '1fr' : 'auto';
return (
<div className="Columns" style={{ gridTemplateColumns: `repeat(${columns}, ${layout})` }}>
{children}
</div>
);
};

export default Columns;
4 changes: 4 additions & 0 deletions components/Columns/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.Columns {
display: grid;
gap: var(--md, 20px);
}
1 change: 1 addition & 0 deletions components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export { default as Callout } from './Callout';
export { default as Cards, Card } from './Cards';
export { default as Code } from './Code';
export { default as CodeTabs } from './CodeTabs';
export { default as Columns, Column } from './Columns';
export { default as Embed } from './Embed';
export { default as Glossary } from './Glossary';
export { default as HTMLBlock } from './HTMLBlock';
Expand Down
16 changes: 16 additions & 0 deletions docs/built-in-components.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,19 @@
<Tab title="Second Tab">Here's content that's only inside the second Tab.</Tab>
<Tab title="Third Tab">Here's content that's only inside the third Tab.</Tab>
</Tabs>

---

### Columns

<Columns columns={3} layout="auto">
<Column>
Neque porro quisquam est qui dolorem ipsum quia
</Column>
<Column>
*Lorem ipsum dolor sit amet, consectetur adipiscing elit*
</Column>
<Column>
> Ut enim ad minim veniam, quis nostrud ullamco
</Column>
</Columns>
Loading

0 comments on commit 08d7a38

Please sign in to comment.