Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Widget declaration docgen support (for React, React native, SolidJS) #168

Merged
merged 70 commits into from
Jul 25, 2022

Conversation

softmarshmallow
Copy link
Member

@softmarshmallow softmarshmallow commented Jul 21, 2022

Initial tsdoc support for react widgets generated by grida.co

docgen.example.short.mov

Output example

/**
 * ${Widget} from design - {@link https://grida.co/files/xxx/yyy}
 *
 * ---
 * @example
 * ```tsx
 * import React from "react";
 *
 * export default function (){
 *    return (
 *      <>
 *        👇 instanciate widget like below. 👇
 *        <Widget/>
 *      </>
 *    );
 * }
 * ```
 * ---
 * @param props (any) - this widget does not requires props. you can pass custom dynamic props to the widget as you want (on typescript, it will raise type check issues).
 *
 * ---
 * @preview
 * ![widget render preview](https://bridged-service-static.s3.us-west-1.amazonaws.com/device-frames/iphone-11-fit-black-no-shadow.png)
 *
 * [view on browser](https://grida.co)
 *
 * ---
 * @remarks
 * @see {@link https://grida.co/docs/widgets} for more information.
 *
 * ---
 * @privateRemarks
 * Code generated by grida.co | engine v2022.1.0 (Apache-2.0) | Generated code under CC0 (public domain)
 * *This code is free to use, modify, and redistribute. (aknowledgment is not required)*
 *
 * ![Made with Grida](https://bridged-service-static.s3.us-west-1.amazonaws.com/branding/logo/32.png)
 *
 * ![](https://bridged-service-static.s3.us-west-1.amazonaws.com/opengraph/og-image-gif.gif)
 *
 * <!-- Info: Please do not remove this comment unless intended. removing this section will break grida integrations. -->
 * <!-- grida.meta.widget_declaration | engine: v2022.1.0 | source: ${id} | uri: ${resource-uri} -->
 */
function Widget() {
  // ...
}

Wip
Screen Shot 2022-07-21 at 4 28 29 PM

Jul-24-2022 10-03-14

@softmarshmallow softmarshmallow marked this pull request as ready for review July 25, 2022 03:06
@softmarshmallow softmarshmallow changed the title [Draft] Initial React function tsdoc support Initial Widget declaration docgen support (for React, React native, SolidJS) Jul 25, 2022
@softmarshmallow softmarshmallow merged commit b2279cc into staging Jul 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant