1 contributor
Like
Install square as a package?
Copied
npm i @bit/joshk.tic-tac-toe-game.square
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
modifieddraft
chevron_left
chevron_right
Square ()
Square is a cell in the main 2d array, and can receive any value and optional color.
Example
Properties
Name | Type | Description |
---|---|---|
row (required) | number | row value in 2d array to be returned when is clicked |
col (required) | number | column value in 2d array to be returned when is clicked |
setValue (required) | Function | function that called to send row and column values to update value in 2d array |
value (required) | string | value to set (X/O) |
disable (required) | boolean | disable the square |
color | string | optional hex color to override X and O color |