Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More UI components and React icons #44

Merged
merged 9 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
27 changes: 26 additions & 1 deletion .figmaexportrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

// @ts-check

const { pascalCase } = require('@figma-export/utils')

module.exports = {
commands: [
[
Expand Down Expand Up @@ -37,7 +39,7 @@ module.exports = {
],
outputters: [
require('@figma-export/output-components-as-svg')({
output: './icons',
output: './icons/svg',
getDirname: () => '',
getBasename: ({ basename, dirname }) => {
// Special handing for the directional arrows which have an odd export naming convention
Expand All @@ -53,6 +55,29 @@ module.exports = {
return `${basename}.svg`
},
}),
require('@figma-export/output-components-as-svgr')({
output: './icons/react',
getFileExtension: () => '.tsx',
getDirname: () => '',
getComponentName: ({ componentName }) =>
pascalCase(
componentName
.split('/')
.map((n) => `${n[0].toUpperCase()}${n.slice(1)}`)
.reverse()
.join('') + 'Icon',
),
getSvgrConfig: () => {
return {
jsxRuntime: 'automatic',
typescript: true,
titleProp: true,
svgProps: {
role: 'img',
},
}
},
}),
],
},
],
Expand Down
8 changes: 8 additions & 0 deletions components/dist/asciidoc.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* Copyright Oxide Computer Company
*/

@layer components {
.asciidoc-body .line-through {
text-decoration: line-through;
Expand Down
8 changes: 8 additions & 0 deletions components/dist/button.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, you can obtain one at https://mozilla.org/MPL/2.0/.
*
* Copyright Oxide Computer Company
*/

button,
a,
label {
Expand Down
72 changes: 0 additions & 72 deletions components/dist/index.d.ts

This file was deleted.

Loading