Skip to content

Commit

Permalink
fixup! feat(help): add new component
Browse files Browse the repository at this point in the history
  • Loading branch information
civing committed May 10, 2023
1 parent 872de53 commit 72decf5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion src/components/form/examples/form-with-help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { schema } from './help-form-schema';

/**
* Form wich use help component
* @link nhelp-form-schema.ts
*
* @link help-form-schema.ts
*/
@Component({
tag: 'limel-example-form-with-help',
Expand Down
2 changes: 1 addition & 1 deletion src/components/help/examples/help-open-direction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Component, h } from '@stencil/core';
tag: 'limel-example-open-direction',
shadow: true,
})
export class HelprExampleOpenDirection {
export class HelperExampleOpenDirection {
public render() {
return (
<limel-help
Expand Down
7 changes: 6 additions & 1 deletion src/components/help/examples/help.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import { Component, h } from '@stencil/core';

const markdown = `
# Helpful text
__I'm so helpful__
`;
/**
* Basic example
*/
Expand All @@ -9,6 +14,6 @@ import { Component, h } from '@stencil/core';
})
export class HelprExample {
public render() {
return <limel-help content="I'm so helpful" />;
return <limel-help content={markdown} />;
}
}
3 changes: 1 addition & 2 deletions src/components/help/help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { Link } from '@limetech/lime-elements';
* @exampleComponent limel-example-help
* @exampleComponent limel-example-read-more
* @exampleComponent limel-example-open-direction
*
*/
@Component({
tag: 'limel-help',
Expand Down Expand Up @@ -74,7 +73,7 @@ export class Help {
<div
// ref={(el) => (this.rootElement = el as HTMLDivElement)}
>
{this.content}
<limel-markdown-viewer content={this.content} />
</div>
{this.renderReadMoreLink()}
</limel-popover>,
Expand Down

0 comments on commit 72decf5

Please sign in to comment.