File tree 1 file changed +3
-3
lines changed
Filter options
1 file changed +3
-3
lines changed
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ const escapeMarkdown = (text) => {
111
111
*/
112
112
const getRelativeFilename = ( file ) => {
113
113
let relativePath = file . includes ( 'node_modules' )
114
- ? path . relative ( path . join ( __dirname , '..' , '..' ) , file ) . replace ( ' coreui-' , '' )
114
+ ? file . split ( 'node_modules/@ coreui/' ) [ 1 ]
115
115
: path . relative ( GLOBBY_OPTIONS . cwd , file ) . replace ( 'coreui-' , '' )
116
116
117
117
// Remove '-pro' from the filename if not a pro component
@@ -284,14 +284,14 @@ const createMdx = async (file, component) => {
284
284
? 'ReactElement'
285
285
: propInfo . type . name
286
286
: ''
287
- const defaultValue = propInfo . defaultValue ? `\`${ propInfo . defaultValue . value } \`` : `undefined`
287
+ const defaultValue = propInfo . defaultValue ? `\`${ propInfo . defaultValue . value } \`` : '-'
288
288
const example = propInfo . tags ?. example
289
289
? replaceText ( component . displayName , 'example' , propInfo . tags . example )
290
290
: false
291
291
292
292
// Format types as inline code
293
293
const types = splitOutsideBracesAndParentheses ( type )
294
- . map ( ( _type ) => `\`${ _type . trim ( ) } \`` )
294
+ . map ( ( _type ) => `\`${ _type . trim ( ) . replaceAll ( '"' , "'" ) } \`` )
295
295
. join ( ', ' )
296
296
297
297
const id = `${ component . displayName . toLowerCase ( ) } -${ propName . replaceAll ( / ( [ a - z ] ) ( [ A - Z ] ) / g, '$1-$2' ) . toLowerCase ( ) } `
You can’t perform that action at this time.
0 commit comments