mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
Chore: Fix broken link to widget reference docs (#259)
This commit is contained in:
parent
eb6093976d
commit
4929834a1b
2 changed files with 5 additions and 2 deletions
|
|
@ -7,7 +7,7 @@ import OverlayTrigger from 'react-bootstrap/OverlayTrigger';
|
|||
import Popover from 'react-bootstrap/Popover';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
import { toast } from 'react-toastify';
|
||||
import { validateQueryName } from '@/_helpers/utils';
|
||||
import { validateQueryName, convertToKebabCase } from '@/_helpers/utils';
|
||||
|
||||
export const Inspector = ({
|
||||
selectedComponentId,
|
||||
|
|
@ -244,7 +244,7 @@ export const Inspector = ({
|
|||
</div>
|
||||
|
||||
<div className="widget-documentation-link p-2">
|
||||
<a href={`https://docs.tooljet.io/docs/widgets/${componentMeta.name.toLowerCase()}`} target="_blank">
|
||||
<a href={`https://docs.tooljet.io/docs/widgets/${convertToKebabCase(componentMeta?.name ?? '')}`} target="_blank">
|
||||
<small>
|
||||
{componentMeta.name} documentation
|
||||
</small>
|
||||
|
|
|
|||
|
|
@ -129,3 +129,6 @@ export function validateQueryName(name){
|
|||
const nameRegex = new RegExp('^[A-Za-z0-9_-]*$');
|
||||
return nameRegex.test(name);
|
||||
};
|
||||
|
||||
|
||||
export const convertToKebabCase = string => string.replace(/([a-z])([A-Z])/g, '$1-$2').replace(/\s+/g, '-').toLowerCase()
|
||||
|
|
|
|||
Loading…
Reference in a new issue