Skip to content

Commit 57c1fd0

Browse files
add example project
1 parent 4c0608b commit 57c1fd0

File tree

3 files changed

+34
-33
lines changed

3 files changed

+34
-33
lines changed

examples/react/grida.config.js

+26-31
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,32 @@
1-
/**
2-
* @type {import('@grida/builder-config').FrameworkConfig}
3-
*/
4-
const frameworkConfig = {
5-
framework: "react",
6-
language: "tsx",
7-
component_declaration_style: {
8-
exporting_style: {
9-
type: "export-named-functional-component",
10-
declaration_syntax_choice: "function",
11-
exporting_position: "with-declaration",
12-
},
13-
},
14-
};
1+
// This file is auto-generated by Grida.
152

163
/**
17-
* @type {import('@grida/builder-config').DesignSourceConfig}
4+
* @type {import('grida').GridaConfig}
185
*/
19-
const designSourceConfig = {
20-
provider: "figma",
21-
file: "x7RRK6RwWtZuNakmbMLTVH",
22-
client: "api.figma.com",
23-
auth: {
24-
personalAccessToken: process.env.FIGMA_PERSONAL_ACCESS_TOKEN,
6+
const config = {
7+
name: 'my-react-app',
8+
designsource: {
9+
provider: 'figma',
10+
file: 'x7RRK6RwWtZuNakmbMLTVH',
11+
client: 'api.figma.com',
12+
},
13+
fallbackDir: './grida',
14+
framework: {
15+
framework: 'react',
16+
language: 'tsx',
17+
styling: {
18+
type: 'styled-components',
19+
module: '@emotion/styled',
20+
},
21+
component_declaration_style: {
22+
exporting_style: {
23+
type: 'export-named-functional-component',
24+
declaration_syntax_choice: 'function',
25+
export_declaration_syntax_choice: 'export',
26+
exporting_position: 'with-declaration',
27+
},
28+
},
2529
},
2630
};
2731

28-
/**
29-
* @type {import('grida').GridaConfig}
30-
*/
31-
const config = {};
32-
33-
module.exports = {
34-
name: "react-example",
35-
designsource: designSourceConfig,
36-
framework: frameworkConfig,
37-
};
32+
module.exports = config;

examples/react/grida/.gitkeep

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This directory is reserved for Grida. you may remove this .gitkeep file once the directory is fullfilled.

examples/react/package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
2-
"name": "react-example",
3-
"version": "0.0.0"
2+
"name": "my-react-app",
3+
"version": "0.0.0",
4+
"dependencies": {
5+
"react": "18.2.0",
6+
"@emotion/react": "11.9.3",
7+
"@emotion/styled": "^11.10.0"
8+
}
49
}

0 commit comments

Comments
 (0)