Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions packages/doc/src/components/CodeBlock/CodeBlock.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
} from './shared/modules';

const buildImportString = (code, modules) => {
const findComponents = /(?:<|{)(\w*)(?=\s*?\/?>*)/gm;
const findComponents = /(?:<|: |{)(\w*)(?=\s*?\/?>*)/gm;
const findStyledComponents = /styled\(\w*/gm;
const sortModules = /(@gympass\/yoga*)/gm;
const imports = [];
Expand All @@ -24,7 +24,7 @@ const buildImportString = (code, modules) => {
const moduleComponents = {
components: [
...new Set(
foundComponents.map(c => c.replace(/<|{/, '')).filter(c => c),
foundComponents.map(c => c.replace(/<|: |{/, '')).filter(c => c),
),
...new Set(
foundStyledComponents
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ import * as YogaComponents from '@gympass/yoga';
import * as YogaIcons from '@gympass/yoga-icons';
import * as YogaHelpers from '@gympass/yoga-helpers';

const YogaNativeComponents = { GymCard: undefined };
const YogaNativeComponents = {
GymCard: undefined,
Result: undefined,
Avatar: undefined,
};
Object.assign(YogaComponents, YogaNativeComponents);

const NativeComponents = {
Expand Down