Skip to content
This repository was archived by the owner on Sep 26, 2023. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"author": {
"name": "Daniel Slovinsky & Justin Wallace"
},
"browser": {
"fs": false
},
"contributors": [
{
"name": "Daniel Slovinsky",
Expand Down Expand Up @@ -47,6 +50,7 @@
"dev": "yarn build --watch --onSuccess \"yalc push\""
},
"dependencies": {
"findup-sync": "^5.0.0",
"goober": "^2.1.12"
},
"peerDependencies": {
Expand All @@ -57,6 +61,8 @@
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^8.0.7",
"@types/findup-sync": "^4.0.2",
"@types/node": "^20.1.4",
"@types/react": "^18.0.31",
"@types/react-dom": "^18.0.11",
"@typescript-eslint/eslint-plugin": "^5.57.0",
Expand Down
Binary file modified src/assets/quarks-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion src/assets/quarks-logo.svg

This file was deleted.

11 changes: 11 additions & 0 deletions src/getConfig.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import findupSync from 'findup-sync';

const getConfig = () => {
const path = findupSync('quarks.config.ts');

const config = path && require(path);

return config;
};

export default getConfig;
7 changes: 5 additions & 2 deletions src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,21 @@ import { shouldForwardProp } from 'goober/should-forward-prop';
import { createElement } from 'react';

import PROP_PREFIX from './constants/prefix';
import useTheme from './theme';
import getConfig from './getConfig';

import type { StyleProps } from './types/quarkProps';

const config = getConfig();
console.log(config);

export const validateProp = (string: string): string is keyof StyleProps =>
typeof string === 'string' && string.startsWith(PROP_PREFIX);

const setupQuarks = () =>
setup(
createElement,
prefix,
useTheme,
undefined,
shouldForwardProp(prop => !validateProp(prop)),
);

Expand Down
Loading