2.0.3 • Published 3 months ago

ssw.rules.widget v2.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

SSW.Rules.Widget

A Widget to display recent rules from SSW Rules

This is a React component, published as an NPM package to be installed on other sites. It retrieves data from SSW.Rules.Content and displays the most recently updated rules.

NPM Package

Installation

npm i ssw.rules.widget

Usage

import { RulesWidget } from 'ssw.rules.widget';

function ExamplePage() {
  return (
    <>
      /* Simplest implementation */
      <RulesWidget />

      /* Using all the options */
      <RulesWidget latestRulesUrl={"#"} skip={5} rulesUrl={"#"} userRulesUrl={"#?="} showLogo={true} numberOfRules={5} author={authorGitHubUsername} location={window.location}/>
    </>
  );
}

Props

NameTypeDefaultRequiredUse
rulesUrlstring"https://www.ssw.com.au/rules"NoURL for the SSW rules list.
userRulesUrlstring"https://ssw.com.au/rules/user-rules/?author="NoURL for the user's specific SSW rules list. Only defined if author is provided.
showLogobooleanfalseNoWhether to show the SSW logo. Defaults to true if not explicitly set.
locationstring${window.location.href}NoCurrent URL of the page hosting the widget.
skipnumber0NoIndex of the first rule to display in the widget.
numberOfRulesnumber10NoNumber of rules to display in the widget.
authorstringnullNoGitHub username of the author to filter rules by.
2.0.3

3 months ago

2.0.2

4 months ago

2.0.1

5 months ago

2.0.0

5 months ago

1.6.2

7 months ago

1.6.1

7 months ago

1.6.0

7 months ago

1.5.4

8 months ago

1.5.3

8 months ago

1.5.2

9 months ago

1.3.4

10 months ago

1.3.3

10 months ago

1.4.1

10 months ago

1.3.2

10 months ago

1.3.1

11 months ago

1.1.4

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.0.9

3 years ago

1.0.10

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago